package com.dynamicallo.ty.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.dynamicallo.ty.dao.ContentMapper;
import com.dynamicallo.ty.dao.IntertableMapper;
import com.dynamicallo.ty.entity.Intertable;

/**
 * 
 * @author wb
 * @date 2016年1月2日 下午5:39:25
 */
@Service("intertableService")
public class IntertableServiceImpl implements IInterbaleService{
	 @Autowired
	 private IntertableMapper intertableMapper;
	public int addIntertabale(Intertable intable) {
		return intertableMapper.insert(intable);
	}

	public Intertable getIntertable(int id) {
		return intertableMapper.selectByPrimaryKey(id);
	}

	public int updateIntertable(Intertable intable) {
		return intertableMapper.updateByPrimaryKeySelective(intable);
	}

    public List<Integer> getAllActionByContentId(Integer contentId) {
        return intertableMapper.getAllActionByContentId(contentId);
    }

}
